package com.gopay.common.domain.ptbank;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Version;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;


/**
 * Entity: 机构托管费配置子表
 */
@Entity
@Table(name = "GSRT_BANK_HF_ORG_RATELIST_SUB")
public class GsrtBankHfOrgRatelistSub implements java.io.Serializable {

	private static final long serialVersionUID = 1L;

	/** 
	 * id
	 */
	private Long id;

	/** 
	 * 乐观锁版本号
	 */
	private Long version;

	/** 
	 * 机构托管费配置ID
	 */
	private Long hfOrgRateRatelistId;

	/** 
	 * 档位
	 */
	private String level;

	/** 
	 * 起始金额
	 */
	private BigDecimal beginmoney;

	/** 
	 * 结束金额
	 */
	private BigDecimal endmoney;

	/** 
	 * 收费方式：01固定金额 02按费率
	 */
	private String method;

	/** 
	 * 托管费率        02时费率必输
	 */
	private BigDecimal trustrate;

	/** 
	 * 封顶金额|固定金额   01时金额必输
	 */
	private BigDecimal ojtcap;

	/** 
	 * 创建时间
	 */
	private Date createdTs;

	/** 
	 * 记录最后修改时间
	 */
	private Date lastUpdTs;

	/**
	 * 备注
	 */
	private String remark;

	/**
	 * 备注2
	 */
	private String remark2;

	/**
	 * 备注3
	 */
	private String remark3;

	public GsrtBankHfOrgRatelistSub() {
	}


	@Id
	@SequenceGenerator(name = "GsrtBankHfOrgRatelistSubSequence", sequenceName = "GSRT_BANK_HO_RATELIST_SUB_SEQ")
	@GeneratedValue(generator = "GsrtBankHfOrgRatelistSubSequence", strategy = GenerationType.SEQUENCE)
	@Column(name = "ID", unique = true, nullable = false, precision = 22, scale = 0)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Version
	@Column(name = "VERSION", precision = 22, scale = 0)
	public Long getVersion() {
		return this.version;
	}

	public void setVersion(Long version) {
		this.version = version;
	}

	@Column(name = "HF_ORG_RATE_RATELIST_ID", nullable = false, precision = 22, scale = 0)
	public Long getHfOrgRateRatelistId() {
		return this.hfOrgRateRatelistId;
	}

	public void setHfOrgRateRatelistId(Long hfOrgRateRatelistId) {
		this.hfOrgRateRatelistId = hfOrgRateRatelistId;
	}

	@Column(name = "RATE_LEVEL", nullable = false, length = 2)
	public String getLevel() {
		return this.level;
	}

	public void setLevel(String level) {
		this.level = level;
	}

	@Column(name = "BEGINMONEY", nullable = false, precision = 16)
	public BigDecimal getBeginmoney() {
		return this.beginmoney;
	}

	public void setBeginmoney(BigDecimal beginmoney) {
		this.beginmoney = beginmoney;
	}

	@Column(name = "ENDMONEY", nullable = false, precision = 16)
	public BigDecimal getEndmoney() {
		return this.endmoney;
	}

	public void setEndmoney(BigDecimal endmoney) {
		this.endmoney = endmoney;
	}

	@Column(name = "RATE_METHOD", nullable = false, length = 2)
	public String getMethod() {
		return this.method;
	}

	public void setMethod(String method) {
		this.method = method;
	}

	@Column(name = "TRUSTRATE", precision = 16, scale = 5)
	public BigDecimal getTrustrate() {
		return this.trustrate;
	}

	public void setTrustrate(BigDecimal trustrate) {
		this.trustrate = trustrate;
	}

	@Column(name = "OJTCAP", precision = 16)
	public BigDecimal getOjtcap() {
		return this.ojtcap;
	}

	public void setOjtcap(BigDecimal ojtcap) {
		this.ojtcap = ojtcap;
	}

	@Column(name = "CREATED_TS", nullable = false)
	public Date getCreatedTs() {
		return this.createdTs;
	}

	public void setCreatedTs(Date createdTs) {
		this.createdTs = createdTs;
	}

	@Column(name = "LAST_UPD_TS", nullable = false)
	public Date getLastUpdTs() {
		return this.lastUpdTs;
	}

	public void setLastUpdTs(Date lastUpdTs) {
		this.lastUpdTs = lastUpdTs;
	}

	@Column(name = "REMARK", length = 50)
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name = "REMARK2", length = 50)
	public String getRemark2() {
		return this.remark2;
	}

	public void setRemark2(String remark2) {
		this.remark2 = remark2;
	}

	@Column(name = "REMARK3", length = 50)
	public String getRemark3() {
		return this.remark3;
	}

	public void setRemark3(String remark3) {
		this.remark3 = remark3;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this, ToStringStyle.DEFAULT_STYLE);
	}
}
